package com.paziy.notes.core;

import java.util.EnumMap;
import java.util.Map;

/**
 * Information about composition: name, album year and else
 * Information about author and copier rights
 *
 * @author thecederick@gmail.com (Paziy Evgeniy)
 * @version 0.2
 * @since 0.1 (06.12.13 11:07)
 */
public class CompositionInformation {

    //todo add tags compositions

    /**
     * Represents type of information. Holds all possible value of information about composition
     * If need new type of {String} information need just and name of type to enum
     */
    public static enum Type {
        Title, SubTitle,  Artist, Album, Lyricist, Composer, Copyright, Tabbed
    }

    /**
     * Holds {String} information about {Type}
     */
    private Map<Type, String> information = new EnumMap<Type, String>(Type.class);

    /**
     * Getter for all possible information about track.
     * Wrapper for {get} method of {Map} class.
     * @see java.util.Map#get(Object)
     *
     * @param informationType key of information we need
     * @return returns {String} information (can be null if never set)
     */
    public String get(Type informationType) {
        return information.get(informationType);
    }

    /**
     * Setter for all possible information about track.
     * Wrapper for {put} method of {Map} class.
     * @see java.util.Map#put(Object, Object)
     *
     * @param informationType key of information
     * @param value value we want to set
     */
    public void set(Type informationType, String value) {
        information.put(informationType, value);
    }
}
